﻿using System;
using System.Web.UI.WebControls;
using Bingosoft.Components.DataDictionary.WebControls;
using Bingosoft.Web.Utils;

namespace Bingosoft.WebApp.Modules.DataDictionary
{
    public partial class DataDictionaryDemo : System.Web.UI.BasePage
    {
        protected DataDictionaryDropDownList MyDictionary;
        protected DataDictionaryRadioButtonList MyDictionary2;
        protected ListControl CurrentSelectList;
           
        protected void Page_Load(object sender, EventArgs e)
        {
            MyDictionary = ControlHelper.FindControl(this.SmartFormView1, "MyDictionary") as DataDictionaryDropDownList;
            MyDictionary2 = ControlHelper.FindControl(this.SmartFormView1, "MyDictionary2") as DataDictionaryRadioButtonList;
            if (Page != null && !Page.IsPostBack)
            {
                //MyDictionary.SelectedValue = "cc";
                if (MyDictionary2 != null) MyDictionary2.SelectedValue = "M";
            }

            CurrentSelectList = MyDictionary;
        }

        protected void IndexChanged(object sender, EventArgs e)
        {
            CurrentSelectList = sender as ListControl;
        }

        public String Evl(string value)
        {
            return value;
        }
    }
}